SelectAltShowTextModule = { create_alt_show_text: function (element) { var options = element.find('option'); $.each(options, function () { $(this).attr('original_text', $(this).html()) }); element.focus(function (event) { $.each(options, function () { $(this).html($(this).attr('original_text')); }); }); element.blur(function (event) { $.each(options, function () { $(this).html($(this).attr('alt_show_text')); }); }); element.change(function (event) { $(this).trigger('blur'); }); }, };